
// 登录页面数据类型
interface IGloginInfo{
      account:string | number,
      password:string  
}
interface account {
      message: string
      required?: boolean
      trigger: string
  }
  
type accountLength = Omit<account, "required"> & {
      min: number
      max: number
  }
  
interface password extends account {}
  
interface passLength extends accountLength {}
  
interface rules {
      account: Array<account | accountLength>
      password: Array<password | passLength>
  }

interface IGRegister{
        username:string,
        password:string,
        name:string,
        phone:string,
        gender:string,
        idCardNum:string,
        age:number | null
}
interface IGPageInfo{
      pageNum:number,//第几页
      total:number,//总共的数据
      pages:number,//总共多少页
      pageSize:number
}
interface IGAddGoodForm {
          goodName:string|null,
          goodDetail:string|null,
          goodPrice:number|null,
          goodStock:number|null,
          goodStatus:number|null,
          goodImg:string|null,
          limitNum:number,//限购数量
          notice:string|null,//权益须知
          manual:string|null //说明书
}

interface IGGoodDetailForm  extends IGAddGoodForm {
      id:number,
      goodSales:number
}

interface  IGGoodEditForm   extends IGGoodDetailForm {}

interface IGCreateActivity{
      activityName:string|null,
      activityDetail:string|null,
      activityRule:string|null,
      activityStartTime:string|null //"2022-02-07 08:00:00",活动开始时间
      activityEndTime:string|null//"2022-02-07 09:00:00",//活动结束时间
      goodId:number|null, //和本次活动绑定的商品id
      isShow:number|null//活动是否展示在客户端 0不展示|1展示
      }
type IGEditActivity = IGCreateActivity 

interface IGEditRule {
      id:number, 
      ruleName:string,
      status:number
}

type IGAddRule = Omit<IGEditRule,'id'>